

  <style type="text/css">
    .jqplot-target {
        margin-bottom: 2em;
    }

    pre {
        background: #D8F4DC;
        border: 1px solid rgb(200, 200, 200);
        padding-top: 1em;
        padding-left: 3em;
        padding-bottom: 1em;
        margin-top: 1em;
        margin-bottom: 4em;

    }

    p {
        margin: 2em 0;
    }

    .note {
        font-size: 0.8em;
    }
  </style>


<?php if(!empty($datos_grafico)): ?>

  <script class="code" type="text/javascript">
      jQuery(document).ready(function(){
        var s1 = <?php echo $datos_grafico["ventas"] ?>/*[2, 6, 7, 10]*/;
        var ticks = <?php echo $datos_grafico["nombre"] ?>/*['a', 'b', 'c', 'd']*/;

        plot1 = jQuery.jqplot('chart1', [s1], {
            seriesDefaults:{
                renderer:jQuery.jqplot.BarRenderer,
                pointLabels: { show: true }
            },
            axes: {
                xaxis: {
                    renderer: jQuery.jqplot.CategoryAxisRenderer,
                    ticks: ticks
                }
            },
            highlighter: { show: false }
        });

        $('#chart1').bind('jqplotDataClick',
            function (ev, seriesIndex, pointIndex, data) {
                $('#info1').html('series: '+seriesIndex+', point: '+pointIndex+', data: '+data);
            }
        );
    });</script>
<script type="text/javascript">
    jQuery(document).ready(function(){
        jQuery(document).unload(function() {$('*').unbind(); });

    });
</script>
    
<?php endif; ?>


  <h1 style="text-align: center;"><?php echo $titulo; ?></h1>

<?php if(!empty($datos_grafico)): ?>
    <div id="chart1" style="margin-top:20px; margin-left:20px; width:300px; height:300px; margin: auto;"></div>

<?php else: ?>
<?php echo "No hay datos disponibles para este reporte." ?>
<?php endif; ?>
